<div class="panel panel-default panel-full" ng-controller="schpacketCtrl">
    <!-- Default panel contents -->
    <div class="panel-heading">报文查询</div>
    <div class="panel-body">
        <div class="row">
            <div class="col-lg-3">
                <p class="input-group"  uib-popover="可以输入perl表达式正则"  popover-trigger="mouseenter">
                    <span class="input-group-addon"><label >客户标志</label></span>
                    <input type="text" class="form-control" ng-model="clientId" placeholder="客户端标志">
                </p>
            </div>
            <div class="col-lg-3">
                <p class="input-group">
                    <span class="input-group-addon"><label>消息来源</label></span>
                    <select class="form-control" ng-model="sendfrom" ng-change="chgtype()">
                        <option value="">全部</option>
                        <option value="c_s">客户端</option>
                        <option value="s_c">服务端</option>

                    </select>
                </p>
            </div>
            <div class="col-lg-3">
                <p class="input-group">
                    <span class="input-group-addon"><label>消息类型</label></span>
                    <select class="form-control" ng-model="packettype">
                        <option value="{{ptype.value}}" ng-repeat="ptype in packettypes track by $index">
                            {{ptype.text}}
                        </option>

                    </select>
                </p>
            </div>
        </div>
        <div class="row">

            <div class="col-lg-3">
                <p class="input-group">
                    <span class="input-group-addon"><label>开始时间</label></span>
                    <input  autoClose="true" class="form-control" date-time format="YYYY-MM-DD HH:mm:ss" view="date" maxView="year" minView="minutes"  ng-model="startdate" readonly>
                </p>
            </div>

            <div class="col-lg-3">
                <p class="input-group">
                    <span class="input-group-addon"><label>截止时间</label></span>
                    <input  class="form-control"  date-time format="YYYY-MM-DD HH:mm:ss" view="date" maxView="year" minView="minutes"  ng-model="enddate" readonly>
                </p>
            </div>

        </div>
        <div class="row">
            <div class="col-lg-12">
                <button class="btn btn-success" type="button" ng-click="sch()">
                    查询
                </button>
            </div>

            </div>
        <div class="row">
            <div class="col-lg-12">
        <!-- Table -->
        <table class="table packettable">
            <thead>
            <tr>
                <th>序号</th>
                <th>客户端标识</th>
                <th>IP端口</th>
                <th>时间</th>

                <th>发送类型</th>
                <th>消息类型</th>
                <th>数据长度</th>
                <th>消息内容</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="packet in data track by $index">
                <td>{{$index+1+count*(currentPage-1)}}</td>
                <td nowrap="nowrap">{{packet.Clientid}}</td>
                <td nowrap="nowrap">{{packet.Ip}}</td>
                <td>{{packet.Stime | date:'yyyy-MM-dd HH:mm:ss.sss' }}</td>

                <td nowrap="nowrap">{{packet.Type | sendfrom2zh:''}}</td>
                <td nowrap="nowrap">{{packet.Msgtype }}</td>
                <td>{{packet.Datalen}}</td>
                <td style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis; height:50px" title="{{packet.Msg}}">{{packet.Msg}}</td>
            </tr>
            </tbody>
        </table>
    </div>
    </div>
    </div>
    <div class="panel-footer">

        <uib-pagination
                total-items="totalPage"
                ng-model="currentPage"
                max-size="maxSize"
                class="pagination-sm"
                boundary-links="true"
                previous-text="上页"
                next-text="下页"
                first-text="首页"
                last-text="尾页"
                rotate="false"
                ng-change="pageChanged()"
                num-pages="numPages"></uib-pagination>

    </div>
</div>